package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

@TableName("t_order")
public class OrderBean implements Serializable {
    @TableId(value = "pk_orderId", type = IdType.AUTO)
    private Integer id;

    @TableField(exist = false)
    private UserBean user;
    @TableField("fk_userId")
    private Integer userId;

    @TableField(exist = false)
    private MovieBean movie;
    @TableField("fk_movieId")
    private Integer movieId;

    public OrderBean() {
    }

    public OrderBean(UserBean user, MovieBean movie) {
        this.user = user;
        this.movie = movie;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public MovieBean getMovie() {
        return movie;
    }

    public void setMovie(MovieBean movie) {
        this.movie = movie;
    }

    public Integer getMovieId() {
        return movieId;
    }

    public void setMovieId(Integer movieId) {
        this.movieId = movieId;
    }

    @Override
    public String toString() {
        return "OrderBean{" +
                "id=" + id +
                ", user=" + user +
                ", userId=" + userId +
                ", movie=" + movie +
                ", movieId=" + movieId +
                '}' + "\n";
    }
}
